<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<script type="text/javascript">
function deleteCheck(no,currentPage){
	if(confirm(no + " 번 글을 삭제하시겠습니까?")){
		alert('삭제되었습니다.');
		location.href="JdeleteAction.action?no="+ no +"&currentPage="+ currentPage;
	}; 
}

function modifyCheck(no,currentPage){
	if(confirm(no + " 번 글을 수정하시겠습니까?")){
		location.href="JmodifyForm.action?no="+ no +"&currentPage="+ currentPage;
	}; 
}

</script>

<h2 class="page_title"><strong>ABOUT MACHMAKER</strong></h2>
<div class="event_modul">
	
	<div class="image">
		<s:if test="resultClass.file_savname == null">
			<p class="align_c noImg">?</p>
		</s:if>
		<s:else>
			<img src="C:\\project_file\\jboard\\<s:property value="resultClass.file_savname"/>" />
		</s:else>
	</div><!-- image -->
	<div class="text">
		<p class="align_r">
			<b>NO</b> : <s:property value="resultClass.no" /> <b>DATE</b> : <s:property value="resultClass.regdate" />
		</p>
		<p class="align_r">
			<b>VIEWS</b> : <s:property value="resultClass.readhit" />
		</p>
		<dl>
			<dt>SUBJECT</dt>
			<dd><s:property value="resultClass.subject"/></dd>
			<dt>WRITER</dt>
			<dd><s:property value="resultClass.nickname"/></dd>
		</dl>
	</div><!-- text -->
	<div class="float_l content"><s:property value="resultClass.content" /></div>
</div><!-- event_modul -->

<p class="align_r">
	<s:url id="modifyURL" action="modifyAction">
		<s:param name="no">
			<s:property value="no" />
		</s:param>
	</s:url>
	<s:url id="deleteURL" action="deleteAction">
		<s:param name="no">
			<s:property value="no" />
		</s:param>
	</s:url>
	<s:if test="#session.session_id == resultClass.id">
	<input type="button" value="수정" class="inputb" onClick="javascript:modifyCheck('<s:property value="no"/>','<s:property value="currentPage" />');">
	<input type="button" value="삭제" class="inputb" onClick="javascript:deleteCheck('<s:property value="no"/>','<s:property value="currentPage" />');">
	</s:if>
	<input name="list" type="button" value="목록" class="inputb" onClick="javascript:location.href='JlistAction.action?currentPage=<s:property value="currentPage" />'">
</p>


